home *** CD-ROM | disk | FTP | other *** search
/ Amiga Collections: MegaDisc / MegaDisc 28 (1992-05)(MegaDisc Digital Publishing)(AU)(Disk 2 of 2).zip / MegaDisc 28 (1992-05)(MegaDisc Digital Publishing)(AU)(Disk 2 of 2).adf / Programming / BASIC_TUTORIAL_9 / CalcLines.bas < prev    next >
BASIC Source File  |  1992-05-26  |  1KB  |  49 lines

  1. INPUT "Point Size of FONT  ",ps
  2. PRINT
  3. INPUT "Window Height       ",ws
  4. PRINT
  5. INPUT "Do you want a printout [Y]es [N]o ",po$
  6. la=ws/ps:la=INT(la)
  7. PRINT
  8. PRINT "Lines available =   ",la
  9. PRINT
  10. IF po$="y" OR po$="Y" THEN
  11.         OPEN "PAR:" FOR OUTPUT AS #1
  12.         PRINT #1,"Point Size of FONT   ";ps
  13.         PRINT #1,""
  14.         PRINT #1,"Window Height        ";ws;" Lines."
  15.         PRINT #1,""
  16.         PRINT #1,"Lines Available      ";la
  17.         PRINT #1,""
  18. END IF
  19. bl=1
  20. FOR tl=1 TO la
  21. PRINT "Top of TextLine ";
  22. PRINT USING "###";tl;
  23. PRINT " = ";
  24. PRINT USING "###";(tl*ps)-ps;
  25. PRINT " Bottom of TextLine ";
  26. PRINT USING "###";tl;
  27. PRINT " = ";
  28. PRINT USING "###";(tl*ps)-1
  29. IF po$="y" OR po$="Y" THEN
  30.         PRINT #1,"Top of TextLine ";
  31.         PRINT #1,USING "###";tl;
  32.         PRINT #1," = ";
  33.         PRINT #1,USING "###";(tl*ps)-ps;
  34.         PRINT #1," Bottom of TextLine ";
  35.         PRINT #1,USING "###";tl;
  36.         PRINT #1," = ";
  37.         PRINT #1,USING "###";(tl*ps)-1
  38. END IF
  39. bl=bl+1
  40. IF bl=>25 THEN
  41. bl=1:
  42. INPUT "press Return to Continue",dum$
  43. END IF
  44. NEXT tl
  45. INPUT "Press RETURN ",dum$
  46. CLOSE #1
  47. SYSTEM
  48.  
  49.